<?php
/**
 * 扩展验证器类
 *
 * @author SuperX
 * @copyright company
 * @package utility
 * @version $Id: Validators.php 41 2009-07-08 17:10:42Z littlexiang521 $
 */
class Validators extends Validator{
	
    /**
     * 检查用户名
     *
     * @param string
     * @return bool
     */
    protected function checkUsername ($username)
    {
        $validator = Validators::getInstance($username);
        $check = $validator->length(3, 12)->regMatch('/[0-9a-z_]+/i')->is();
        return $check;
    }
    
    /**
     * 检查密码
     *
     * @param string
     * @return bool
     */
    protected function checkPassword ($password)
    {
        $validator = Validators::getInstance($password);
        $check = $validator->length(3, 12)->regMatch('/[0-9a-z_ ]+/i')->is();
        return $check;
    }
    
    /**
     * 检查Email
     *
     * @param string
     * @return bool
     */
    protected function checkEmail ($email)
    {
        $validator = Validators::getInstance($email);
        $check = $validator->isEmail()->is();
        return $check;
    }
	
	

}
?>